<template>

	  <el-table
	    border
	    style="width: 100%"
	    :data="tableData"
		>
	    <el-table-column
	      prop="name"
	      label="司机"
	      width="180">
	    </el-table-column>
	    <el-table-column
	      prop="totalCount"
	      label="里程">
	    </el-table-column>
		<el-table-column
		  prop="totalKm"
		  label="费用">
		</el-table-column>
	  </el-table>
</template>

<script>
    import  { getDriversList } from '../api/driver.js'
	export default {
     data() {
    return {
		 tableData: null
	};
	  },
	  created(){
		  this.getDriver()
	  },
	  methods: {
		  //获取后台数据
		getDriver(){
			getDriversList().then(response => {
				this.tableData = response.data
				console.log(this.tableData)
			})
		}
	  } 
	  }
</script>

<style>
</style>
